<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NINJA: NINJA/BinaryHeap_TwoInts.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">NINJA
   &#160;<span id="projectnumber">2.x</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_binary_heap___two_ints_8hpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">BinaryHeap_TwoInts.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_binary_heap___two_ints_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef BINARYHEAP_TWO_INTS_HPP</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define BINARYHEAP_TWO_INTS_HPP</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; </div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;climits&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160; </div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_exception_handler_8hpp.html">ExceptionHandler.hpp</a>&quot;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_binary_heap_8hpp.html">BinaryHeap.hpp</a>&quot;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; </div>
<div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="structints2float.html">    9</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structints2float.html">ints2float</a> {</div>
<div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="structints2float.html#a708929d819022ff899a29cc5288c1ebe">   10</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structints2float.html#a708929d819022ff899a29cc5288c1ebe">first</a>;</div>
<div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="structints2float.html#a7c27a5931f1e35c60a0da8b81658e909">   11</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structints2float.html#a7c27a5931f1e35c60a0da8b81658e909">second</a>;</div>
<div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="structints2float.html#a8e6cb1dc21e9125f7a822d0786e004ed">   12</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="structints2float.html#a8e6cb1dc21e9125f7a822d0786e004ed">key</a>;</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;};</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="class_binary_heap___two_ints.html">   15</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_binary_heap___two_ints.html">BinaryHeap_TwoInts</a> {</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    <span class="comment">//constructors</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <a class="code" href="class_binary_heap___two_ints.html#ae1e39bfeaa140bd4608796e1c80491f1">BinaryHeap_TwoInts</a>();</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    <a class="code" href="class_binary_heap___two_ints.html#ae1e39bfeaa140bd4608796e1c80491f1">BinaryHeap_TwoInts</a>(<span class="keywordtype">int</span> maxCapacity);</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    <a class="code" href="class_binary_heap___two_ints.html#ae1e39bfeaa140bd4608796e1c80491f1">BinaryHeap_TwoInts</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> *val1s, <span class="keyword">const</span> <span class="keywordtype">int</span> *val2s, <a class="code" href="struct_float.html">Float</a> keys);</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160; </div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <a class="code" href="class_binary_heap___two_ints.html#ae1e39bfeaa140bd4608796e1c80491f1">BinaryHeap_TwoInts</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> *val1s, <span class="keyword">const</span> <span class="keywordtype">int</span> *val2s, <a class="code" href="struct_float.html">Float</a> keys, <span class="keywordtype">int</span> maxCapacity);</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <a class="code" href="class_binary_heap___two_ints.html#a1fa71262df0bb9bf2c9b6266eb9af356">~BinaryHeap_TwoInts</a>();</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="class_binary_heap___two_ints.html#a7591ee0a24dd8dd6bb904b4ead51ff04">size</a>() <span class="keyword">const</span>; <span class="comment">//return BinaryHeap size</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="comment">//functions</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_binary_heap___two_ints.html#aeb013e054d6cf4e8b21baf1ae10b12b4">insert</a>(<span class="keywordtype">int</span> val1, <span class="keywordtype">int</span> val2, <span class="keywordtype">float</span> key) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_binary_heap___two_ints.html#a4d9f2c086da3211a124893f2231fe427">deleteMin</a>() <span class="keyword">const</span>; <span class="comment">//Remove the smallest item from the priority queue</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_binary_heap___two_ints.html#a66fa2c6397631c8e2571efb9b9635ff9">isEmpty</a>() <span class="keyword">const</span>; <span class="comment">//check if empty</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_binary_heap___two_ints.html#a81fe1d180e77658e1473317fc7a85fa3">makeEmpty</a>() <span class="keyword">const</span>; <span class="comment">//empty heap</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_binary_heap___two_ints.html#a8f4ba6e7b7568543be697b132c04b945">buildAgain</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> *val1s, <span class="keyword">const</span> <span class="keywordtype">int</span> *val2s, <a class="code" href="struct_float.html">Float</a> keys);</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_binary_heap___two_ints.html#a03c9fb4cbdfd9942b59ee9285ae51c93">chopBottomK</a>(<span class="keywordtype">int</span> *val1s, <span class="keywordtype">int</span> *val2s, <a class="code" href="struct_float.html">Float</a> keys) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="class_binary_heap___two_ints.html#a45c70aaf8f40152386c00eb260425642">   42</a></span>&#160;    std::vector&lt;ints2float&gt; *<a class="code" href="class_binary_heap___two_ints.html#a45c70aaf8f40152386c00eb260425642">heap</a>;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160; </div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="class_binary_heap___two_ints.html#a6f4be2950530c270562b46fea29faec6">   44</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="class_binary_heap___two_ints.html#a6f4be2950530c270562b46fea29faec6">DEFAULT_CAPACITY</a> = 1000;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="class_binary_heap___two_ints.html#a7105a0874acdf81833a22cb55230db9d">binHeapTwoTest</a>(<span class="keywordtype">bool</span> verbose);</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160; </div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;};</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="a_binary_heap_8hpp_html"><div class="ttname"><a href="_binary_heap_8hpp.html">BinaryHeap.hpp</a></div></div>
<div class="ttc" id="astructints2float_html_a7c27a5931f1e35c60a0da8b81658e909"><div class="ttname"><a href="structints2float.html#a7c27a5931f1e35c60a0da8b81658e909">ints2float::second</a></div><div class="ttdeci">int second</div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.hpp:11</div></div>
<div class="ttc" id="astruct_float_html"><div class="ttname"><a href="struct_float.html">Float</a></div><div class="ttdef"><b>Definition:</b> BinaryHeap.hpp:14</div></div>
<div class="ttc" id="a_exception_handler_8hpp_html"><div class="ttname"><a href="_exception_handler_8hpp.html">ExceptionHandler.hpp</a></div></div>
<div class="ttc" id="aclass_binary_heap___two_ints_html_a03c9fb4cbdfd9942b59ee9285ae51c93"><div class="ttname"><a href="class_binary_heap___two_ints.html#a03c9fb4cbdfd9942b59ee9285ae51c93">BinaryHeap_TwoInts::chopBottomK</a></div><div class="ttdeci">void chopBottomK(int *val1s, int *val2s, Float keys) const</div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.cpp:94</div></div>
<div class="ttc" id="astructints2float_html_a8e6cb1dc21e9125f7a822d0786e004ed"><div class="ttname"><a href="structints2float.html#a8e6cb1dc21e9125f7a822d0786e004ed">ints2float::key</a></div><div class="ttdeci">float key</div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.hpp:12</div></div>
<div class="ttc" id="aclass_binary_heap___two_ints_html_a66fa2c6397631c8e2571efb9b9635ff9"><div class="ttname"><a href="class_binary_heap___two_ints.html#a66fa2c6397631c8e2571efb9b9635ff9">BinaryHeap_TwoInts::isEmpty</a></div><div class="ttdeci">bool isEmpty() const</div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.cpp:81</div></div>
<div class="ttc" id="aclass_binary_heap___two_ints_html_a7105a0874acdf81833a22cb55230db9d"><div class="ttname"><a href="class_binary_heap___two_ints.html#a7105a0874acdf81833a22cb55230db9d">BinaryHeap_TwoInts::binHeapTwoTest</a></div><div class="ttdeci">static bool binHeapTwoTest(bool verbose)</div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.cpp:113</div></div>
<div class="ttc" id="aclass_binary_heap___two_ints_html_a45c70aaf8f40152386c00eb260425642"><div class="ttname"><a href="class_binary_heap___two_ints.html#a45c70aaf8f40152386c00eb260425642">BinaryHeap_TwoInts::heap</a></div><div class="ttdeci">std::vector&lt; ints2float &gt; * heap</div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.hpp:42</div></div>
<div class="ttc" id="aclass_binary_heap___two_ints_html_a8f4ba6e7b7568543be697b132c04b945"><div class="ttname"><a href="class_binary_heap___two_ints.html#a8f4ba6e7b7568543be697b132c04b945">BinaryHeap_TwoInts::buildAgain</a></div><div class="ttdeci">void buildAgain(const int *val1s, const int *val2s, Float keys)</div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.cpp:47</div></div>
<div class="ttc" id="aclass_binary_heap___two_ints_html_a4d9f2c086da3211a124893f2231fe427"><div class="ttname"><a href="class_binary_heap___two_ints.html#a4d9f2c086da3211a124893f2231fe427">BinaryHeap_TwoInts::deleteMin</a></div><div class="ttdeci">void deleteMin() const</div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.cpp:75</div></div>
<div class="ttc" id="aclass_binary_heap___two_ints_html_a1fa71262df0bb9bf2c9b6266eb9af356"><div class="ttname"><a href="class_binary_heap___two_ints.html#a1fa71262df0bb9bf2c9b6266eb9af356">BinaryHeap_TwoInts::~BinaryHeap_TwoInts</a></div><div class="ttdeci">~BinaryHeap_TwoInts()</div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.cpp:59</div></div>
<div class="ttc" id="astructints2float_html"><div class="ttname"><a href="structints2float.html">ints2float</a></div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.hpp:9</div></div>
<div class="ttc" id="astructints2float_html_a708929d819022ff899a29cc5288c1ebe"><div class="ttname"><a href="structints2float.html#a708929d819022ff899a29cc5288c1ebe">ints2float::first</a></div><div class="ttdeci">int first</div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.hpp:10</div></div>
<div class="ttc" id="aclass_binary_heap___two_ints_html_a6f4be2950530c270562b46fea29faec6"><div class="ttname"><a href="class_binary_heap___two_ints.html#a6f4be2950530c270562b46fea29faec6">BinaryHeap_TwoInts::DEFAULT_CAPACITY</a></div><div class="ttdeci">static const int DEFAULT_CAPACITY</div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.hpp:44</div></div>
<div class="ttc" id="aclass_binary_heap___two_ints_html_a81fe1d180e77658e1473317fc7a85fa3"><div class="ttname"><a href="class_binary_heap___two_ints.html#a81fe1d180e77658e1473317fc7a85fa3">BinaryHeap_TwoInts::makeEmpty</a></div><div class="ttdeci">void makeEmpty() const</div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.cpp:89</div></div>
<div class="ttc" id="aclass_binary_heap___two_ints_html_aeb013e054d6cf4e8b21baf1ae10b12b4"><div class="ttname"><a href="class_binary_heap___two_ints.html#aeb013e054d6cf4e8b21baf1ae10b12b4">BinaryHeap_TwoInts::insert</a></div><div class="ttdeci">void insert(int val1, int val2, float key) const</div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.cpp:65</div></div>
<div class="ttc" id="aclass_binary_heap___two_ints_html_a7591ee0a24dd8dd6bb904b4ead51ff04"><div class="ttname"><a href="class_binary_heap___two_ints.html#a7591ee0a24dd8dd6bb904b4ead51ff04">BinaryHeap_TwoInts::size</a></div><div class="ttdeci">int size() const</div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.cpp:85</div></div>
<div class="ttc" id="aclass_binary_heap___two_ints_html_ae1e39bfeaa140bd4608796e1c80491f1"><div class="ttname"><a href="class_binary_heap___two_ints.html#ae1e39bfeaa140bd4608796e1c80491f1">BinaryHeap_TwoInts::BinaryHeap_TwoInts</a></div><div class="ttdeci">BinaryHeap_TwoInts()</div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.cpp:7</div></div>
<div class="ttc" id="aclass_binary_heap___two_ints_html"><div class="ttname"><a href="class_binary_heap___two_ints.html">BinaryHeap_TwoInts</a></div><div class="ttdef"><b>Definition:</b> BinaryHeap_TwoInts.hpp:15</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_994258571ff4fe75827c48a736f217ad.html">NINJA</a></li><li class="navelem"><a class="el" href="_binary_heap___two_ints_8hpp.html">BinaryHeap_TwoInts.hpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
  </ul>
</div>
</body>
</html>
